#export all_proxy=socks5://localhost:20170/

### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
    print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
    command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
    command git clone https://ghproxy.com/https://github.com/zdharma-continuum/zinit "$HOME/.zinit/bin" --depth=1 && \
        print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
        print -P "%F{160}▓▒░ The clone has failed.%f%b"
    command sed -i "s/raw\.githubusercontent\.com\/ohmyzsh\/ohmyzsh/raw\.sevencdn\.com\/ohmyzsh\/ohmyzsh/g" ~/.zinit/bin/zinit.zsh
    command sed -i "s/github\.com/ghproxy\.com\/https:\/\/github\.com/g" ~/.zinit/bin/zinit-install.zsh
fi

source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
## End of Zinit's installer chunk

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

source ~/.config/zsh/zshrc

zsh-defer -c 'eval $(thefuck --alias)'

if (( $+commands[zoxide] )); then
  zsh-defer -c 'eval "$(zoxide init --no-aliases zsh)"'
fi
